//vue.config.js
'use strict'
const path = require('path')
function resolve(dir) {
    return path.join(__dirname, dir)
  }

module.exports = {
    publicPath: '/', // 根路径
    outputDir: 'dist', // 构建输出目录
    assetsDir: 'assets', // 静态资源目录(js,css,img,fonts)
    lintOnSave: false, // 是否开启eslint保存检测,有效值（true||false||error)
    devServer: {
      open: true, // 有效值（true||false) npm run serve后,是否打开浏览器
      host: 'localhost', // 配置端口号
      port: 8888,
      https: false, // 有效值(true||false)
      hotOnly: false, // 热更新
    },
    configureWebpack: {
        // provide the app's title in webpack's name field, so that
        // it can be accessed in index.html to inject the correct title.
        name: 'cli3.0',
        resolve: {
          alias: {
            '@': resolve('src')
          }
        }
      },
      css: {
        loaderOptions: {
          sass: {
            data: ` @import "@/scss/global.scss";`
          }
        }
      }
  }
  